package com.example.shop.shops.controller;


import com.example.shop.ov.UserDto;
import com.example.shop.shops.service.UserService;
import com.example.shop.util.AjaxResult;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/user")
public class UserController {
    @Autowired
    private UserService userService;

    @PostMapping("/register/phone")
    public AjaxResult getphoneInset(@RequestBody UserDto userDto) {
        userService.gteLogin(userDto);

        return AjaxResult.me().success();
    }
    @PostMapping("/register/email")
    public AjaxResult getemailInset(@RequestBody UserDto userDto) {
        userService.getEmaidAdd(userDto);
        return AjaxResult.me().success();
    }
}
